home *** CD-ROM | disk | FTP | other *** search
- property pShuttleSprite, pMouseH, pMouseV, pLeftShuttle, pRightShuttle
-
- on new me, thisSprite
- set pShuttleSprite to thisSprite
- puppetSprite(pShuttleSprite, 1)
- set pLeftShuttle to the memberNum of sprite pShuttleSprite - 1
- set pRightShuttle to the memberNum of sprite pShuttleSprite + 1
- return me
- end
-
- on mMoveShuttle me
- set x1 to the locH of sprite pShuttleSprite
- if x1 > the mouseH then
- set the memberNum of sprite pShuttleSprite to pLeftShuttle + 1
- updateStage()
- set the memberNum of sprite pShuttleSprite to pLeftShuttle
- updateStage()
- end if
- if x1 < the mouseH then
- set the memberNum of sprite pShuttleSprite to pLeftShuttle + 1
- updateStage()
- set the memberNum of sprite pShuttleSprite to pRightShuttle
- updateStage()
- end if
- if x1 = the mouseH then
- set the memberNum of sprite pShuttleSprite to pLeftShuttle + 1
- updateStage()
- end if
- set the locH of sprite pShuttleSprite to the mouseH
- if the mouseH < 20 then
- set the locH of sprite pShuttleSprite to 20
- end if
- if the mouseH > 620 then
- set the locH of sprite pShuttleSprite to 620
- end if
- end
-
- on mGetSprite me
- return pShuttleSprite
- end
-